<template>
  <a-layout>
    <a-layout>
      <a-layout-content style="padding: 0 24px 24px">
        <a-tabs
          v-model="activeKey"
          type="card"
          @change="handleTabChange"
          :tabBarGutter="8"
          style="margin-top: 16px"
        >
          <a-tab-pane v-for="tab in tabs" :key="tab.key" :tab="tab.title">
            <component :is="tab.component" />
          </a-tab-pane>
        </a-tabs>
      </a-layout-content>
    </a-layout>
  </a-layout>
</template>

<script>
import ExamRecord from './modules/ExamRecord'
import ExamReport from './modules/ExamReport'
import ExamArrange from './modules/ExamArrange'
import ExamLabel from './modules/ExamLabel'
import ExemptionApply from './modules/ExemptionApply'
import ExemptionSetting from './modules/ExemptionSetting'
import ExemptionReport from './modules/ExemptionReport'

export default {
  components: {
    ExamRecord,
    ExamReport,
    ExamArrange,
    ExamLabel,
    ExemptionApply,
    ExemptionSetting,
    ExemptionReport
  },
  data() {
    return {
      activeKey: 'record',
      tabs: [
        {
          key: 'record',
          title: '考场记录提交',
          component: 'ExamRecord'
        },
        {
          key: 'report',
          title: '考试通报发布',
          component: 'ExamReport'
        },
        {
          key: 'arrange',
          title: '考试安排查询',
          component: 'ExamArrange'
        },
        {
          key: 'label',
          title: '考场标签打印',
          component: 'ExamLabel'
        },
        {
          key: 'exemption',
          title: '免修申请处理',
          component: 'ExemptionApply'
        },
        {
          key: 'setting',
          title: '免修限制设置',
          component: 'ExemptionSetting'
        },
        {
          key: 'exemption-report',
          title: '免修情况统计',
          component: 'ExemptionReport'
        }
      ]
    }
  },
  methods: {
    handleTabChange(key) {
      console.log('切换至:', key)
    }
  }
}
</script>

<style scoped>
.header-title {
  font-size: 18px;
  font-weight: bold;
  padding-left: 24px;
  line-height: 64px;
}
</style>